Tapered Evaluation in Chess Engines
Tapered Evaluation
Definition
Tapered evaluation is a technique used in chess engines to smoothly blend two separate assessments of a position—one tailored to the middlegame and one to the endgame—based on the current “game phase.” Instead of flipping a switch from middlegame rules to endgame rules at a fixed moment, the engine interpolates between them, giving a weighted mix that changes gradually as material is exchanged.
How It Works
Most engines maintain two parallel evaluations for many features (piece-square bonuses, king safety, mobility, passed pawns, etc.): a middlegame score (MG) and an endgame score (EG). A single “phase” number, derived from the material on the board, determines how much weight to give each score.
- Typical phase accounting (one common scheme):
- Queen = 4 phase points
- Rook = 2 phase points
- Bishop = 1 phase point
- Knight = 1 phase point
- Pawn = 0 phase points
- Interpolation idea: FinalEval = (Phase/MaxPhase) × MG + (1 − Phase/MaxPhase) × EG.
- Numeric example: If MG = +0.60, EG = +1.20, and Phase = 16 (out of 24), then FinalEval ≈ 0.60×(16/24) + 1.20×(8/24) = 0.40 + 0.40 = +0.80.
This linear blend ensures a continuous transition: as the game simplifies, endgame features matter more; when many pieces remain, middlegame features dominate.
Usage in Chess Engines
- Piece-square tables (PSQT): Engines keep MG and EG tables and taper between them, so a knight in the center is worth more in the middlegame than in a bare endgame, for example.
- King safety: Weighted heavily in MG, tapered down toward EG where exposed kings can be less vulnerable and king activity is encouraged.
- Pawn structure and passed pawns: Bonuses for passed pawns and outside passers grow as the phase decreases, reflecting their increased potency later in the game.
- Mobility and space: Typically matter more in MG, tapering as material falls and maneuvering space becomes less decisive than pawn races or king activity.
- Search stability: By avoiding sharp “rule switches,” tapered evaluation reduces evaluation discontinuities that can cause horizon or oscillation effects during search.
Strategic Significance
Tapered evaluation models human intuition that plans and priorities evolve over the course of a game. In complex middlegames, initiative, king safety, and piece activity matter most; in endgames, passed pawns, king centralization, and zugzwang-sensitive factors take over. The taper helps the engine automatically “know” when to shift from attacking the king to winning a pawn race or activating the king.
Examples
Example 1 (material-driven shift): After early queen exchanges, engines naturally weight endgame features more via tapering. Consider a queen trade arising from the Ruy Lopez:
After 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Bxc6 dxc6 5. d4 exd4 6. Qxd4 Qxd4 7. Nxd4, queens are off and minor pieces are reduced. The phase count drops significantly, so the engine increasingly favors endgame terms like king activity and pawn structure over raw king-safety penalties. If White has a healthier pawn structure, the EG component will contribute more of the final score than it would have a few moves earlier.
You can step through a concise demonstration of a fast transition to an endgame here:
Example 2 (feature weighting): In a rook-and-pawn endgame with outside passed pawns for one side, MG terms like “attack on the king” are nearly irrelevant. Tapering down king-danger terms and amplifying passed-pawn and king-activity bonuses guides the engine to the correct plan of escorting the passer rather than searching for tactics that no longer exist.
Historical Notes
Early engines often used discrete phase thresholds (“middlegame rules” vs. “endgame rules”), which could cause abrupt evaluation jumps around the cutoff. The tapered approach—computing both MG and EG scores and blending them—became common in strong open-source engines in the 2000s and is now ubiquitous in top engines such as Stockfish and Komodo. It pairs well with modern parameter tuning methods (e.g., Texel tuning) that learn optimal MG/EG weights for features.
Interesting Facts
- Most engines keep separate MG and EG values for many features, not just piece-square tables—e.g., different mobility scales, passed-pawn bonuses, and even different penalties for doubled or isolated pawns.
- The exact phase formula and piece weights vary between engines; some even include small phase contributions for pawns or adjust weights based on imbalances like the bishop pair.
- Although linear blending is standard, some engines experiment with non-linear tapers or feature-specific tapers (for instance, king safety might fade faster than mobility).
- Tapered evaluation improves search stability: as you go one ply deeper and a trade becomes likely, the score changes smoothly rather than spiking at a threshold.